package com.example.livereplay.common.model.enity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "SysUser对象")
@TableName("sys_user")
public class SysUser {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private String id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "用户类型 1-管理员 2-大众")
    private Integer userType;

    @Schema(description = "用户头像-->AttachmentId")
    private String headerUrl;

    @Schema(description = "用户类型 本地用户-LOCAL 授权中心-AUTH_CENTER")
    private String userSource;

    @Schema(description = "账户名是否过期 0-未过期 1-已过期")
    private Boolean isAccountNonExpired;

    @Schema(description = "账户是否锁定 0-未锁定 1-已锁定")
    private Boolean isAccountNonLocked;

    @Schema(description = "凭据是否过期 0-未过期 1-已过期")
    private Boolean isCredentialsNonExpired;

    @Schema(description = "状态 0-禁用 1-启用")
    private Boolean isEnabled;

    @Schema(description = "权重")
    private Integer weight;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Long createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private Long updateTime;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private String createBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新者")
    private String updateBy;

    @Version
    @Schema(description = "版本")
    private Long version;


    @Schema(description = "额外信息")
    private String extra;

    @Schema(description = "租户id")
    private String tenantId;
}
